package com.uuah.server.util;

import java.util.Date;

import com.uuah.server.api.IUuahContext;
import com.uuah.server.config.i18n.ServerMessages;

public class ServerShutdownSplashMsg extends SplashMsg {
	protected void doHeader(IUuahContext context) {
		long currentTime = System.currentTimeMillis();
		header.add(ServerMessages.shutdownNormally(new Date()).getMessage());
		long duration = 10;
		if (context.getStartDate() > 0) {
			duration = currentTime - context.getStartDate();
		}
		header
				.add(ServerMessages.serverWasUpForDuration(duration)
						.getMessage());
	}
}
